//
//  PMGlobal.h
//  PurchasingMeeting
//
//  Created by zhuang yihang on 7/20/13.
//  Copyright (c) 2013 YX. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "config.h"

#import "DataManager.h"

#define SEARCH_CODENAME @"款号模糊搜索"
#define SEARCH_SIMCODE @"简码搜索"

typedef enum{
    eSettingBar_Type_Update,
    
#ifdef SHOP_VERIFY_ENABLE
    eSettingBar_Type_Shopcheck,
    eSettingBar_Type_Shopveri,
#endif
    eSettingBar_Type_Admin,
    eSettingBar_Type_Version,
    eSettingBar_Type_Total,
}eSettingBar_Type;

@interface PMGlobal : NSObject{
    int m_iNetwork;//0-可用，1-不可用
    BOOL m_bImageEnable;//是否开启根据网络状态来显示图片的功能
}


+ (PMGlobal *)getInstance;

@property(nonatomic, strong) NSString *version;

- (UIFont *)getPadFont:(float)size;
- (UIFont *)getPhoneFont:(float)size;

- (UIFont *)getBoldPadFont:(float)size;
- (UIFont *)getBoldPhoneFont:(float)size;


- (NSString *)getServerURL;
- (NSString *)getImageURL;

-(NSString *)gettype;

- (void)isWifiOn:(DMCompletion)completion;

- (void)enableImage:(BOOL)enable;
- (int)networkFlag;
- (void)setNetworkFlag:(int)flag;
- (BOOL)isImageEnable;
- (UIImage *)getnavigationbarimage;
-(UIImage *)getretimage;


- (NSString *)getSettingBar_TypeName:(eSettingBar_Type)type;


- (NSArray *)getImageConfig;
- (void)saveImageConfig:(NSArray *)config;
- (NSString *)getImageConfigUrl:(NSString *)type;

@end

#ifdef __cplusplus
extern "C" {
#endif

void showMessage( NSString *message );
    void runBlockAfterDelay( NSTimeInterval delay ,block completion);
    
#ifdef __cplusplus
}

#endif
